{extend name="base" /}
{block name="body"}
<div class="layui-card">
    <div class="layui-card-body">
        <div class="layui-btn-group">
            <a href="{:url('admin/ad/category_add')}" class="layui-btn ajax-iframe" data-width="430px" data-height="200px"><i class="fa fa-plus-circle"></i> 添加</a>
        </div>
        <table class="layui-table layui-form">
            <thead>
                <tr>
                    <th>分类名称</th>
                    <th width="300">调用代码</th>
                    <th width="145">操作</th>
                </tr>
            </thead>
            <tbody>
                {foreach name="list" item="v" empty="$empty"}
                <tr>
                    <td>{$v.name}</td>
                    <td>
                        <input type="text" value="get_ad({$v.id},'desc')" autocomplete="off" class="layui-input" disabled>
                    </td>
                    <td>
                        <a href="{:url('admin/ad/category_edit', ['id' => $v.id])}" class="layui-btn layui-btn-xs layui-btn-normal ajax-iframe" data-width="430px" data-height="200px"><i class="fa fa-edit"></i> 编辑</a>
                        <a href="{:url('admin/ad/category_del', ['id' => $v.id])}" class="layui-btn layui-btn-xs layui-btn-danger ajax-delete"><i class="fa fa-trash-o"></i> 删除</a>
                    </td>
                </tr>
                {/foreach}
            </tbody>
        </table>
    </div>
</div>
{/block}
